package one.to.ten;

public class calcu{
	a start;
	b end;

	public calcu(){
		start = new a();
		end = new b();
	}

	public calcu(int start_number, int end_number){
/*
		start = new a(); 
		// a start = new a();
		end = new b(); 
		// b end = new b();
		start.start = start_number; 
		// this.start = start_number;
		end.end = end_number; 
		// this.end = end_number;
*/
		start = new a();
    	end = new b();
		start.start = start_number;
		end.end = end_number;
	}

	public int getSum(){
		int sum = 0;
		for(int i=start.start;i<=end.end;i++){
		//for (int i=start.start;i<=end.end;i++){
			sum = sum + i;
		}
		return sum;
	}
}